<?php

/**
 * sfFormGuiQuestionParameter form base class.
 *
 * @package    form
 * @subpackage sf_form_gui_question_parameter
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 8807 2008-05-06 14:12:28Z fabien $
 */
class BasesfFormGuiQuestionParameterForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'name'        => new sfWidgetFormInput(),
      'key'         => new sfWidgetFormInput(),
      'value'       => new sfWidgetFormTextarea(),
      'question_id' => new sfWidgetFormPropelSelect(array('model' => 'sfFormGuiQuestion', 'add_empty' => false)),
      'type'        => new sfWidgetFormInput(),
      'scope'       => new sfWidgetFormInput(),
      'id'          => new sfWidgetFormInputHidden(),
    ));

    $this->setValidators(array(
      'name'        => new sfValidatorString(array('max_length' => 255)),
      'key'         => new sfValidatorString(array('max_length' => 255)),
      'value'       => new sfValidatorString(array('required' => false)),
      'question_id' => new sfValidatorPropelChoice(array('model' => 'sfFormGuiQuestion', 'column' => 'id')),
      'type'        => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'scope'       => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'id'          => new sfValidatorPropelChoice(array('model' => 'sfFormGuiQuestionParameter', 'column' => 'id', 'required' => false)),
    ));

    $this->widgetSchema->setNameFormat('sf_form_gui_question_parameter[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'sfFormGuiQuestionParameter';
  }


}
